#!/usr/bin/perl

my @array = ('varible 1', 'abc', 'varible 2');

#Scalar context
my $matchedNumber = grep ( /varib/, @array );
print $matchedNumber, "\n";

#List context
my @matchedList = grep ( /varib/, @array );
print @matchedList, "\n";

